<ion-header-bar align-title="center" class="bar bar-header bar-light"
                style='background: url(img/icon/headerline.png); background-size: contain; background-position: bottom; background-repeat: no-repeat;'>
  <a class="button icon-left ion-ios-arrow-left button-clear button-light" ng-click="backGo()"></a>
  <h1 class="title">{{title}}</h1>
</ion-header-bar>
<div class="tabs-striped tabs-top tabs-light tabs-icon-top">
  <div class="tabs" ng-show="!edit" style="background-color:#F6F6F6">
    <a ng-class="{recv: 'tab-item active', send: 'tab-item'}[isActive]" data-active="recv"
       ng-click="changeTab($event)" style="font-size:16px;line-height:48px;">收文</a>
    <a ng-class="{recv: 'tab-item', send: 'tab-item active'}[isActive]" data-active="send"
       ng-click="changeTab($event)" style="font-size:16px;line-height:48px;">发文</a>
  </div>
</div>
<ion-content ng-class="{'has-subheader':!edit}" class="bg">
  <div ng-if="isActive == 'recv'">
    <ion-refresher pulling-text="<span class='pulling-text-auto'>{{pulltextchange}}</span>" on-refresh="doRefresh()"
                   on-pulling="pulltext()" spinner="ripple" pulling-icon="ion-ios-refresh-empty"></ion-refresher>
    <ion-list ng-show="!edit">
      <ion-item ng-repeat="recv in recvs" ng-click="show(recv)" style="margin-bottom: 10px;border:0px">
        <a class="button icon-right ion-ios-arrow-right button-clear button-light" style="position:absolute;top: 35%;right: 2%;"></a>
        <div class="textLimited"><img src="img/icon/folder.png" style="margin-right: 2%;width: 4%;height: 4%">{{recv.title}}
        </div>
        <hr class="hr">
        <br/>
        <p style="line-height: 35px">流程状态：{{recv.taskState.taskStatus == 'true'?'流程结束':recv.taskState.taskName}}
        </p>
        <p>发起时间：{{recv.createTime}}</p>
      </ion-item>
    </ion-list>
  </div>
  <div ng-if="isActive == 'send'">
    <ion-refresher pulling-text="<span class='pulling-text-auto'>{{pulltextchange}}</span>" on-refresh="doRefresh()"
                   on-pulling="pulltext()" spinner="ripple" pulling-icon="ion-ios-refresh-empty"></ion-refresher>
    <ion-list ng-show="!edit">
      <ion-item ng-repeat="send in sends" style="margin-bottom:10px;border:0px" ng-click="show(send)">
        <a class="button icon-right ion-ios-arrow-right button-clear button-light" style="position:absolute;top:35%;right:2%;"></a>
        <div class="textLimited"><img src="img/icon/folder.png" style="margin-right: 2%;width: 4%;height: 4%">{{send.title}}
        </div>
        <hr class="hr">
        <br/>
        <p style="line-height: 35px">流程状态：{{send.taskState.taskStatus == 'true'?
          '流程结束':send.taskState.taskName}}
        </p>
        <p>发起时间：{{send.createTime}}</p>
      </ion-item>

    </ion-list>
  </div>

  <ion-list ng-show="edit">
    <div class="detailTitle" ng-repeat="field in fields| filter : {showType : '6'}" >
      <img style="width: 4%; height: 4%; position: relative;"
           src="img/icon/folder.png"/>
      {{field.value}}
    </div>
    <div class="detailContent" ng-repeat="field in fields " ng-show="field.showType!=0&&field.showType!=6">
      <div style="display: inline-block;width: 100px">{{field.title}}:</div>

      <!--<span style="color: #666;overflow: hidden;"
                        ng-if="field.showType==7" ed-options="{{field.col}}">{{field.value}}</span>
      <span style="color: #666;overflow: hidden;"
                        ng-if="field.showType!=7&&field.col!='files'">{{field.value}}</span>-->

      <span style="color: #666;overflow: hidden;" ng-if="field.options" ed-options="{{field.options}}">{{field.value}}</span>
      <span style="color: #666;overflow: hidden;" ng-if="(!field.options)&&field.col!='files'">{{field.value}}</span>

      <div ng-repeat = "file in fields.files" ng-if="field.col=='files'">
        <span><a href="#" ng-click="mClick(file.url)">{{file.name}}</a></span>
      </div>
    </div>
    <div class="detailTitle">流程状态：{{taskName}}</div>
  </ion-list>

</ion-content>

